import request from '../utils/requst.js'

// eslint-disable-next-line camelcase
export function getArticles (channel_id, timestamp) {
  return request({
    url: '/v1_0/articles',
    params: {
      channel_id,
      timestamp
    }
  })
}
// 对文章不感兴趣/不喜欢
export const disLike = articleId => {
  return request({
    url: '/v1_0/article/dislikes', // 接口地址
    method: 'POST',
    data: {
      target: articleId
    }
  })
}
/**
 * 举报文章
 * @param {*} articleId  文章编号
 * @param {*} reportType 举报类型
 */
export const report = (articleId, reportType) => {
  return request({
    method: 'POST',
    url: 'v1_0/article/reports',
    data: {
      target: articleId,
      type: reportType
    }
  })
}
